#pragma once

#include <cftc/reflect/object.h>
#include <cftf/meta/table.h>

namespace mt
{

	class AreaTrigger : public cftc::reflect::Object, public cftf::meta::Table<AreaTrigger, unsigned int>
	{
		CFT_DECLARE_REFLECT_CLASS();
	public:
        unsigned int id = 0;
        unsigned int condition = 0;
        unsigned int target_mapId = 0;
        float  target_X = 0.0f;
        float  target_Y = 0.0f;
        float  target_Z = 0.0f;
        float  target_Orientation = 0.0f;
        unsigned int failed_text_mangos_string_id = 0;

        // Operators
        bool IsMinimal() const
        {
            return condition == 0;
        }

        bool IsLessOrEqualThan(AreaTrigger const* l) const;
        static const AreaTrigger* GetMapEntranceTrigger(unsigned int map_id);
        static const AreaTrigger* GetGoBackTrigger(unsigned int map_id);
	};

}
